import React from 'react'
import { Menu, Button} from 'antd';
import 'antd/dist/antd.css';
import {
    ProfileOutlined,
    MenuUnfoldOutlined,
    MenuFoldOutlined,
    CarryOutOutlined,
    DesktopOutlined,
    AuditOutlined,
    CalendarOutlined,
    UsergroupDeleteOutlined,
    NotificationOutlined
  } from '@ant-design/icons';
  import './css/bg.css'
  import {Switch,Route,Link} from 'react-router-dom'
  import Bg_gzt from './bg_gzt'
  import Bg_rc from './bg_rc'
  import Bg_rw from './bg_rw'
  import Bg_gg from './bg_gg'
  import Bg_rz from './bg_rz'
  import Bg_sp from './bg_sp'
  import Bg_txl from './bg_txl'
class Bg extends React.Component {
  
    state = {
        collapsed: false,
      };
      
      toggleCollapsed = () => {
        this.setState({
          collapsed: !this.state.collapsed,
        });
      };

      

      render() {
        return (
        <div className="clearfix bg" style={{background:'#f5f6f9'}}>
            
            <div className ='cd clearfix' id='submit'>
              
            <Menu
              defaultSelectedKeys={['1']}
              defaultOpenKeys={['sub1']}
              mode="inline"
              theme="dark"
              inlineCollapsed={this.state.collapsed}
              className='zj'
            >
                <p>快速创建</p>

              <Menu.Item key="1" icon={<DesktopOutlined />}>
                <Link to='/App/'>工作台</Link>
              </Menu.Item>
              <Menu.Item key="2" icon={<CalendarOutlined />}>
                <Link to="/App/bg_rc">日程</Link>
              </Menu.Item>
              <Menu.Item key="3" icon={<CarryOutOutlined />}>
                <Link to="/App/bg_rw">任务</Link>
              </Menu.Item>
              <Menu.Item key="4" icon={<NotificationOutlined />}>
                <Link to="/App/bg_gg">公告</Link>
              </Menu.Item> 
              <Menu.Item key="5" icon={<ProfileOutlined />}>
                <Link to="/App/bg_rz">日志</Link>
              </Menu.Item>
              <Menu.Item key="6" icon={<AuditOutlined />}>
                <Link to="/App/bg_sp">审批</Link>
              </Menu.Item>
              <Menu.Item key="7" icon={<UsergroupDeleteOutlined />}>
                <Link to="/App/bg_txl">通讯录</Link>
              </Menu.Item>
              <div>


                <Button type="primary" onClick={this.toggleCollapsed} style={{ marginBottom: 16}}>
                    {React.createElement(this.state.collapsed ? MenuUnfoldOutlined : MenuFoldOutlined)}
                </Button>
              </div>
            </Menu>
            
          </div>
          <div className='xxxx clearfix'>
            
              <Switch>
                <Route path="/App/bg_txl" component={Bg_txl}/>
                <Route path="/App/bg_sp" component={Bg_sp}/>
                <Route path="/App/bg_rz" component={Bg_rz}/>
                <Route path="/App/bg_gg" component={Bg_gg}/>
                <Route path="/App/bg_rw" component={Bg_rw}/>
                <Route path="/App/bg_rc" component={Bg_rc}/>
                <Route path="/App/" component={Bg_gzt} />
              </Switch>
            
             
          </div>
          
        </div>
        );
      }
}
export default Bg